#ifndef TYPEPRESTATION_H
#define TYPEPRESTATION_H

#include <Qt>
#include <QString>
#include <QStringList>
#include <QtSql>
#include "objtosql.h"

class TypePrestation : public objToSQL
{
public:


    static const QString NomChampDateObtenuId;
    static const QString NomChampNomPresta;
    static const QString NomChampNombreMusiciens;
    static const QString NomChampTarifHT;
    static const QString NomChampIsLumiere;
    static const QString NomChampIsDecorScene;
    static const QString NomChampTypeSono;
    static const QString NomChampDivers;

    TypePrestation();
    TypePrestation(QString nomPresta, int nombreMusiciens, double tarifHT, bool isLumiere, bool isDecorScene, QString typeSono, QString divers);
    TypePrestation(QSqlQuery query, int i);

    void setDateObtenuId(int i);
    void setNomPresta(QString nomPresta);
    void setNombreMusiciens(int nombreMusiciens);
    void setTarifHT(double tarifHT);
    void setLumiere(bool isLumiere);
    void setDecorScene(bool isDecorScene);
    void setTypeSono(QString typeSono);
    void setDivers(QString divers);

    int getDateObtenuId()const;
    QString getNomPresta()const;
    int getNombreMusiciens()const;
    double getTarifHT()const;
    bool isLumiere()const;
    bool isDecorScene()const;
    QString getTypeSono()const;
    QString getDivers()const;
    QString toString()const;
    QStringList toStringList()const;
    void BindValues(QSqlQuery &query, QStringList champs);

    bool operator ==(TypePrestation const& typePrestation);

    static QStringList ListeChampSQL();
    static QStringList ListeTypeDataSQL();
    static QStringList ListeChampSQLSansId();
    static QStringList ListeTypeDataSQLSansId();
    static QStringList ChampDeTri();

    QStringList SQLWhere()const;
    QString SQLSet()const;
    QString SetQuery()const;
    QStringList SetBindValues()const;
    static QString SQLForeignKey();

private:
//    int m_id;
    int m_dateObtenuId;
    QString m_nomPresta;
    int m_nombreMusiciens;
    double m_tarifHT;
    bool m_isLumiere;
    bool m_isDecorScene;
    QString m_typeSono;
    QString m_divers;

};

#endif // TYPEPRESTATION_H
